<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
	</head>
	<body>
		<div id="app">
			<time-comp></time-comp>
		</div>
		
		<script>
			var img = document.createElement("img")
			img.setAttribute('src',"loading.gif")
			var app = Vue.createApp({
				data(){
					return {
						message:"Hello World!",
					}
				}
			})
			app.component('time-comp',{
				data(){
					return {
						currentTime: '?'
					}
				},
				beforeCreate(){
					document.body.remove(img)
					this.currentTime = new Data().toLocaleDateString()
				},
				template: '<div>当前时间:{{currentTime}}</div>'
			})
			var vm = app.mount("#app")
		</script>
	</body>
</html>
